package com.linden.std.enums;

public enum ExceptionEnums {
    SUCCESS(200, "成功"),
    UNAUTHORIZED(401, "未认证"),
    ACCESS_DENIED(403, "权限不足"),
    USER_NOT_FOUND(1001, "用户不存在"),
    USERNAME_EXISTS(1002, "用户名已存在"),
    PASSWORD_ERROR(1003, "密码错误"),
    OLD_PASSWORD_ERROR(1004, "原密码错误"),
    USER_DISABLED(1005, "用户已禁用"),
    TOKEN_INVALID(1006, "Token无效"),
    TOKEN_EXPIRED(1007, "Token已过期"),
    PASSWORD_NOT_MATCH(1008, "两次密码不一致"),
    CAPTCHA_ERROR(1009, "验证码错误"),
    ACCOUNT_LOCKED(1010, "账户已被锁定"),
    IP_LOCKED(1011, "IP地址已被锁定");

    private final Integer code;
    private final String message;

    ExceptionEnums(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() { return code; }
    public String getMessage() { return message; }
}
